# Column Configuration

Defines site columns (fields) that can be reused across document libraries and content types.

Referenced by: SiteCfg.Columns, DocLibCfg.Columns, ContentTypeCfg.Columns.

# Overview

ColumnCfg defines a SharePoint field/column with its type, validation rules, display format, and default values. Columns are created at the site level and can be added to multiple libraries and content types.

# Applied when

Site columns are created when:

  • The parent SiteCfg is provisioned and references this column via Columns array
  • OR a DocLibCfg references this column via Columns array (creates library-scoped column)
  • OR a ContentTypeCfg references this column via Columns array (adds column to content type)
  • Applied during site or library provisioning; columns are created before they are assigned to content types or added to libraries
  • Retroactive changes to column properties (field type, validation rules) may require manual SharePoint administration or column re-creation

# Core settings

# Name

Type: string | Required: Yes

Unique name used in configuration references to identify this column.

Example: "MatterCode", "ClientName"

# Group

Type: string | Required: No

Field group for UI organization in SharePoint forms and settings.

Example: "Matter Information", "Client Details"

# Title

Type: string | Required: Yes

Display name shown in the UI and column headers.

# Description

Type: string | Required: No

Field description shown in item forms and column settings.

# FieldType

Type: enum | Required: Yes

Data type of the column. Common types: Text, Note, Integer, Number, DateTime, Choice, MultiChoice, Lookup, User, UserMulti, Boolean, Calculated, Taxonomy, Computed.

# Required

Type: bool | Required: No | Default: false

Make the field required. Users must provide a value when creating or editing items.

# EnforceUniqueValues

Type: bool | Required: No

Enforce unique values across items in the library or list. Only applies to indexed fields. When enabled, SharePoint prevents duplicate values in this column.

# DefaultValue

Type: string | Required: No

Default value for new items when created. Special behavior for Boolean fields: If this property is empty or null for a Boolean column, it is automatically set to "Yes".

# Indexed

Type: bool | Required: No

Create an index on this column for faster queries and filtering. Enable for columns frequently used in views, filters, or lookups.

# Hidden

Type: bool | Required: No | Default: false

Hide from the UI (useful for system columns that should not be edited directly by users).

# Text and number columns

# TextMaxLength

Type: int | Required: No | C#: TextMaxLength | Configurator: "MaxLength"

Maximum length for text columns. Valid range: 1–255 characters. When set, users cannot enter more than this many characters.

# Note/rich text columns

# UnlimitedLength

Type: bool | Required: No | Configurator: "Unlimited Length"

Allow unlimited text length in document libraries. When enabled, users can enter text of any length. When disabled, SharePoint enforces a limit (typically 255 characters for standard note fields).

# NumberOfLines

Type: int | Required: No | Configurator: "Number of lines"

Number of text input lines displayed in forms. Controls the height of the text input box. Typical values: 3–10 for short notes, 10–20 for rich text.

# Choice columns

# Choices

Type: string (list) | Required: Conditional | Configurator: "Choices"

The values a user can pick from. Required when FieldType = Choice or MultiChoice — without it the column is created with an empty list of values.

Example: ["Invoice", "Contract", "Correspondence"]

The values are only managed while they are configured:

  • With Choices set, every provisioning run replaces the values in SharePoint with exactly the configured ones. Values someone added by hand are removed.
  • Removing or emptying the property does not clear the values in SharePoint — provisioning simply stops managing them. This differs from AutofillPrompt, which is switched off when it is cleared: turning Autofill off is harmless, whereas a Choice column without values cannot be filled in by users and would orphan the values already stored on documents. To remove the values, edit the column in SharePoint.

When the column also has an AutofillPrompt, the values are appended to the stored prompt (… - Choices: Invoice, Contract, Correspondence) so the AI answers with one of them — the same thing SharePoint does when Autofill is switched on through its own UI.

# Lookup columns

# LookupListName

Type: string | Required: Conditional | Configurator: "ListName"

Name of the source list for lookup values. Required when FieldType = Lookup. The lookup column retrieves values from this list. The list must exist in the same site or a specified site.

Example: "Clients", "MatterTypes"

# LookupFieldName

Type: string | Required: Conditional | Configurator: "FieldName"

Field in the source list to display or link to. Required when FieldType = Lookup. Must match a column name in the list specified by LookupListName. This is the field value shown to users.

Example: "Title", "ClientCode"

# LookupAllowMultipleValues

Type: bool | Required: No | Default: false | Configurator: "AllowMultipleValues"

Allow multiple selections from the lookup list. When enabled, users can select multiple items. When disabled, users can select only one item.

# Calculated columns

# CalculatedFormula

Type: string | Required: Conditional | Configurator: "Formula"

Formula expression for calculated fields. Required when FieldType = Calculated. Uses SharePoint field formula syntax.

Example: =[Field1]+[Field2], =UPPER([Title]), =TODAY()

# CalculatedOutputType

Type: enum | Required: No | Configurator: "Output Type"

Output type of the calculated result. Valid values: Text, Number, Currency, DateTime, Boolean. Determines how the result is displayed and formatted.

# DefaultFormula

Type: string | Required: No

Alternative formula name or expression. Rarely used; CalculatedFormula is the standard approach.

# Computed columns

FieldType: Computed references a SharePoint-managed built-in field (e.g., FileSizeDisplay, FileLeafRef). These fields are created and maintained by SharePoint itself — provisioning does not create or modify them.

During provisioning, the field is looked up in the SharePoint list at runtime. If the field does not exist in the list, provisioning throws an InvalidOperationException.

Example:

{
  "Name": "FileSizeDisplay",
  "FieldType": "Computed"
}

Note: Properties such as Required, DefaultValue, and validation rules have no effect on Computed columns.

# Taxonomy/managed metadata columns

# TaxonomyTermset

Type: string | Required: Conditional | Configurator: "Termset"

Termset name for managed metadata columns. Required when FieldType = Taxonomy. Must reference an existing term set in the managed metadata service.

Example: "Locations", "Document Classification"

# TaxonomyTermGroup

Type: string | Required: Conditional | Configurator: "Termgroup"

Term group name that contains the termset. Required when FieldType = Taxonomy. Provides the scope for the termset lookup.

# DateTime columns

# DateTimeFriendlyDisplayFormat

Type: enum | Required: No | Configurator: "Friendly Display Format"

Display format for relative date display. Valid values: Unspecified, Relative, Standard.

  • Unspecified — No special formatting
  • Relative — Displays as relative time (e.g., "2 days ago", "3 weeks from now")
  • Standard — Standard date format

# DateTimeFieldFormatType

Type: enum | Required: No | Configurator: "Display Format"

Format type for the datetime field. Valid values: DateTime (date and time), DateOnly (date only).

Note: This affects how values are displayed and input in forms.

# Autofill columns (AI prompt)

# AutofillPrompt

Type: string | Required: No | Configurator: "Prompt"

AI prompt that fills this column automatically for documents uploaded to the library. When set, provisioning enables SharePoint's Autofill on the column and stores the prompt, so consultants no longer have to switch it on by hand per library.

Example: "Return the invoice number, or leave empty if the document is not an invoice"

# What you configure, and what you do not

The prompt is the only switch. There is no separate "enable Autofill" property: a prompt means Autofill is on, an empty prompt means it is off.

Nothing has to be switched on in SharePoint afterwards. Provisioning makes the same service call the Autofill panel in the SharePoint UI makes, so the column arrives with Autofill already enabled and the prompt already filled in. Opening the column in SharePoint afterwards shows the toggle on — that is a way to check the result, not a step to perform.

To add Autofill to a configuration that already provisions columns onto a document library, the whole change is: set Prompt (Configurator: Sets > Columns > the column > category Autofill) on each column that should be filled. Nothing else in the configuration changes.

The one thing to check is that the column really is a library column. Autofill cannot be set on a site column, so the column must be listed in:

  • DocLibCfg.Columns — Configurator: Sets > Document Libraries > the library > Columns, or
  • SiteCfg.Lists[].Columns for a list whose TemplateType is DocumentLibrary.

A column referenced only from SiteCfg.Columns is a site column, and its prompt is skipped with a warning in the log.

# Where Autofill can be applied

  • SharePoint Online only. The setting is skipped on SharePoint 2016.
  • Library columns only. Autofill cannot be set on site columns, so the column must be configured on the library itself — either DocLibCfg.Columns, or SiteCfg.Lists[].Columns for a list whose TemplateType is DocumentLibrary. A prompt on a column configured under SiteCfg.Columns is skipped.
  • Document libraries only. A prompt on a column of a list that is not a document library is skipped. SharePoint also excludes the system libraries FormServerTemplates, SitePages, Style Library and SiteAssets; a prompt on a column of those is skipped as well.
  • Subsites work too. Microsoft's documentation states that Autofill is offered on the primary site of a site collection only, but libraries on a subsite accept and process a prompt in the same way. Provisioning therefore does not skip them, which matters when matters or clients are provisioned as subsites rather than as separate site collections.

Every skipped case above is written to the log as a warning and does not fail the provisioning run. The same applies when SharePoint refuses the call that configures Autofill — for example because the tenant lacks permission for the document processing service: the failure is written to the log with the status SharePoint returned, the column itself is provisioned normally, and the run continues.

# Supported field types

A prompt on a field type that is not supported is skipped and written to the log. The reason column says whether the limit comes from SharePoint or from provisioning.

FieldType Autofill Why
Text Yes
Note (multiple lines of text) Yes
Number Yes
Currency Yes
Boolean (Yes/No) Yes
DateTime Yes
Choice Yes Also set Choices
URL (hyperlink) Yes
Managed metadata (TaxonomyTermset set) Yes Single and multi-value; a multi-value column receives one term
Integer No Excluded by provisioning. Microsoft lists it neither as supported nor as unsupported, so it is left out rather than guessed at. Use Number for a whole number that has to be filled by AI
MultiChoice No Not in Microsoft's list of supported types; only single-value Choice is
User / UserMulti (person or group) No Not supported by SharePoint
Lookup No Not supported by SharePoint
Calculated / Computed No Not supported by SharePoint; the value comes from SharePoint itself
Location, Image No Not supported by SharePoint

All nine supported types were verified end to end on a licensed tenant: a document uploaded to a provisioned library had every one of them filled by SharePoint.

# Tenant requirements

  • Provisioning must be connected with app-only authentication — an Application Client ID with a certificate or secret. Autofill is configured through a SharePoint service call that needs an access token, which a user name and password connection does not have; in that case the prompt is skipped with a warning in the log.
  • The tenant must have the SharePoint autofill capability (Copilot in SharePoint / SharePoint Premium) enabled and licensed, with pay-as-you-go billing configured — Autofill is a metered service, not a flat-rate feature.
  • An administrator can limit Autofill to selected sites (Microsoft 365 admin center > Settings > Org settings > Pay-as-you-go services > Autofill columns). If the target site is excluded there, the setting is written but SharePoint does not process files.
  • Provisioning cannot detect whether either of these is in place. SharePoint accepts and stores the autofill setting on a tenant that does not have the capability at all, and then simply never processes anything — no error, no filled values. To confirm the capability is available, open a document library and select + Add column > Text > Next: if there is no Autofill section in the panel, the tenant cannot use autofill columns, and any AutofillPrompt in the configuration has no effect.

# Behavior and limits

  • SharePoint fills the column for newly uploaded documents only. Documents already in the library are not processed automatically; a user has to select them and choose More options (...) > Autofill in the library. Changes to an existing document are only picked up when it is reprocessed that way.
  • Microsoft recommends no more than 10 autofill columns per library, and files of no more than 65 pages.
  • The column name is used as context for the prompt, so give autofill columns meaningful names.
  • For a Choice column, set Choices. Provisioning appends the values to the stored prompt — … - Choices: Invoice, Contract, Other — exactly as the SharePoint UI does, so the AI answers with one of them.
  • Text and Note columns hold 255 characters by default. For longer generated values set UnlimitedLength to true on a Note column, which raises the limit to 64K.
  • For managed metadata columns, only the first 100 terms of the term set are considered.
  • A managed metadata column that allows multiple values is accepted and filled, but in practice SharePoint returns a single term — even for a document that matches several. Do not count on more than one term being filled in.
  • Encrypted files are not analyzed.

Note: This configuration is leading. Removing AutofillPrompt (or leaving it empty) switches Autofill off again on the next provisioning run, including when someone switched it on by hand in SharePoint. Column values that were already filled in are left alone; only new documents stop being processed.

# When a configured prompt fills nothing

These are written to the provisioning log, as a warning starting with Skipped Autofill prompt for column <name>:

Cause What the log says
The column is a site column, not a library column Autofill is only supported on library columns, not on site columns
The list is not a document library is not a document library
The list is a system library (FormServerTemplates, SitePages, Style Library, SiteAssets) is a system library that does not support Autofill
The field type is not supported field type <type> does not support Autofill
The connection is not app-only configuring Autofill needs an access token, which requires app-only authentication
SharePoint 2016 build Autofill requires SharePoint Online
SharePoint refused the call SetColumnLLMInfo returned <status> followed by the server's own message

These leave no trace at all — provisioning reports success and SharePoint simply never fills anything:

  • The tenant does not have the autofill capability, or pay-as-you-go billing is not configured. The setting is accepted and stored, and nothing is ever processed.
  • The site is excluded in Microsoft 365 admin center > Settings > Org settings > Pay-as-you-go services > Autofill columns.
  • The documents were already in the library before the prompt was configured. Only newly uploaded documents are processed automatically; existing ones must be selected and run through More options (...) > Autofill.
  • The file is encrypted, or longer than the 65 pages Microsoft supports.
  • The model finds no answer in the document. A prompt asking for an invoice date fills nothing when the document contains no date — the column stays empty and no error is raised anywhere.

A case worth calling out separately: a Choice column provisioned without Choices. Provisioning creates the column with an empty list of allowed values, so even when the model answers, there is no matching value for SharePoint to store and the column stays empty. Set Choices whenever a Choice column carries a prompt.

Example:

{
  "Name": "InvoiceNumber",
  "Title": "Invoice number",
  "FieldType": "Text",
  "AutofillPrompt": "Return the invoice number, or leave empty if the document is not an invoice"
}

Note: Use SharePoint's own "Test the prompt" panel in the column settings to try out prompt wording before putting it in the configuration.

Last Updated: 9/23/2026, 9:13:25 AM